The center hole of a wheel is directly matched with a main shaft of an automobile, so the size of the center hole is always strictly controlled in the machining process of the wheel; in the traditional control method, a worker holds a go-no go gauge to detect the size completely; however, since the automatic production mode is continually improved, this detection mode cannot adapt to modern production anymore; and therefore, an automatic detection device is needed to meet the full automatic online detection requirement of the key size.